home *** CD-ROM | disk | FTP | other *** search
Wrap
XSetup plugin | 2002-01-03 | 3.9 KB | 128 lines
"FILE"="Xteq Systems X-Setup Plugin 6.0" "TYPE"="9" "COUNT"="1" "UIPATH 1"="Appearance\Files&Folders\Files" "UIPATH 2"="Internet\Internet Explorer\Appearance" "UIPATH 3"="Program Options\Microsoft Office\MS Office 97" "UIPATH 4"="Program Options\Microsoft Office\MS Office 2000\Common" "UIPATH 5"="Program Options\Microsoft Office\MS Office XP\Common" "NAME"="Internet Explorer hosted files" "VERSION"="2.14" "LANGUAGE"="VBScript" "TEXT 1"="Display inside Internet Explorer" "DESCRIPTION 1"="Internet Explorer 4.0 (and any version above) try to host Microsoft Office Files (e.g. XLS Files) inside the Internet Explorer window. " "DESCRIPTION 2"="For example, if you click a XLS file in Internet Explorer (IE), IE downloads the file and opens it in it's own Window. This is good feature if you only want to view the file but if you want to edit it, it's very annoying that you don't get the "full" Excel window." "DESCRIPTION 3"="A selected (tick-mark beside it) file means: Open in Internet Explorer. An unselected item (no tick-mark beside it) means: Open in own application." "AUTHOR"="Xteq Systems" "CONTACTURL"="http://www.xteq.com/" "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved" "COMMENT 1"="see Q162059 in MS KB" 'ONLY EDIT THE LINE BELOW !!!! '****************************************************************** sVals=Array(".doc",".xls",".ppt",".prj",".pdf") '****************************************************************** sPath="HKLM\Software\Classes\" sValue="\BrowserFlags" SUB Plugin_Initialize for i=0 to UBound(sVals) sItem=sVals(i) 'get file description sP=sPath & sItem & "\@" sBase=RegReadValue(sP) if IsEmpty(sBase)=true then 'has no description, don't need to go any further Call SetUI(i+1,sItem,true) else 'HKLM\Software\Classes\XX File\NeverShowEx sP=sPath & sBase & sValue if RegReadValue(sP)<>8 then 'Value is NOT 8 => open in IE Call SetUI(i+1,sItem,true) else 'Value is 8 => open in own application Call SetUI(i+1,sItem,false) end if end if next END SUB Sub SetUI(ItemNr,Typ,Activated) sDesc=GetFileDescription(Typ) Call SetUIElement(ItemNr, sDesc & " (" & Typ & ")" ) Call SetUIElementEx(ItemNr,Activated) End Sub 'VERSION 1.1 'returns the readable description for a file TYPE. Input is the 'raw file type (e.g. ".TXT"). Function GetFileDescription(DotType) sxd_BasePath="HKLM\Software\Classes\" sxd_Path=sxd_BasePath & DotType & "\@" sxd_Val=RegReadValue(sxd_Path) if IsEmpty(sxd_Val)=true then 'extended description not found! return default GetFileDescription="<UNKNOWN>" else 'found, now get the "real" description sxd_Path=sxd_BasePath & sxd_Val & "\@" sxd_Name=RegReadValue(sxd_Path) if IsEmpty(sxd_Name)=true then 'argh! GetFileDescription="<UNKNOWN>" else GetFileDescription=sxd_Name end if end if End Function 'Called when the Plugin should apply the changes SUB Plugin_Apply(ElementIndex,ElementSubIndex) for i=0 to UBound(sVals) sItem=sVals(i) 'get file description sP=sPath & sItem & "\@" sBase=RegReadValue(sP) if IsEmpty(sBase)=true then Call MsgError("Unable to set for type " & sItem & " as this type is not known on your PC.") else 'HKLM\Software\Classes\XX File\NeverShowEx sP=sPath & sBase & sValue if GetUIElementEx(i+1)=true then 'open in IE if RegValueExists(sP) then Call RegDeleteValue(sP) end if else 'hide extension Call RegWriteValue(sP,"8",2) end if end if next Call Logoff() END SUB 'Called when the Plugin is about to be removed from memory SUB Plugin_Terminate END SUB